package com.example.book_test.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
@Order(2)
public class AspectDemo {
    @Before("@annotation(com.example.book_test.config.MyAspect)")
    public void doBefore(){
        log.info("执行AspectDemo before");
    }

    @After("@annotation(org.springframework.web.bind.annotation.RequestMapping)")
    public void doAfter(){
        log.info("执行AspectDemo after");
    }
}
